<template>
	<div class='customization'>
		<TopNav
			navName="陪伴模块定制"
			color="#00493E"
			msgColor="#01937C"
			showCollect
			showBack
			backColor="#01937C"
			:showTitle="false"
		/>
		<component
			:is="pageDemo"
			:role="role"
		/>
	</div>
</template>

<script>
import Demo1 from './Demo1.vue'
import Demo2 from './Demo2.vue'

export default {
  components: {
    Demo1,
    Demo2
  },
  computed: {
    pageDemo() {
      return this.$route.query.demo ? this.$route.query.demo : 'Demo1'
    },
    role() {
      const user = this.$storeGet('getMyInfo')

      console.log(user)
      return user.role
    }
  }
}
</script>

